home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-04 | 3.2 KB | 115 lines | [TEXT/MPS ] |
- //234567890123456789012345678901234567890123456789012345678901234567890123456789
- //===========================================================================
- // File: SecurityPublic.h
- //
- // This file contains some public declarations for Apple Remote Access
- // add-on security. These are declarations that are accessed by modules
- // outside of security modules.
- //
- // Copyright © 1992, 1993 Apple Computer Inc.
- // All rights reserved
- //
- // Author: Farzad Sarabi
- //
- // Modification history:
- //
- // 5/14/1993 Farzad Added ARADataLockFailed error code
- // 2/15/1993 Farzad Added some new error codes
- // 11/11/1992 Farzad Moved some of the declarations out of
- // SecurityInterface.h to here.
- //===========================================================================
-
-
- #ifndef SECURITY_PUBLIC
- #define SECURITY_PUBLIC 1
-
-
-
- #define kSecurityMaxConfigData 150 // maximum number of bytes of
- // security-sepcific configuration
- // data
-
- #define kSecurityUserInfoLength 32 // for GetUserInfo call, includes
- // 1 byte for length field
-
-
- typedef long SecurityReference; // reference to a loaded code
- // reference
-
-
-
-
- // the following are result codes returned by security code resources
- // as a response to various actions
-
-
- typedef enum {
- kSecurityNoErr, // successful
- kSecurityBadDataErr, // passed in data is invalid
- kSecurityGenericErr, // for all errors not defined below
- kSecurityMemErr, // a memory manager problem
- kSecurityUnsupportedAction // an unknown action
-
- } SecurityErrors;
-
-
-
- typedef enum {
-
- kSecurityStartup, // first action you should setup everything
- kSecurityShutdown, // last action you should cleanup
- kSecurityBegin, // start of operation (e.g. authentication)
- kSecurityEnd, // end of operation (e.g. authentication)
- kSecurityDataAvailable, // you have data from other side
- kSecurityAbort, // ARA is requesting you to abort
- kSecurityTickleAction // sent to tickle you
-
- } SecurityActions; // you should support these actions
-
-
-
-
-
- typedef enum {
-
- ARANoErr, // successful
- ARAInternalError, // ARA had an internal error
- ARATimeout, // operation timed out
- ARAAbort, // abort sent to completion routines
- ARAGenericErr, // used for abnormal conditions
- ARABadReference, // an invalid SecurityReference was passed to ARA
- ARAServiceNotAvailable, // this ARA service is not available to your
- // type of code resource (e.g. a read is not
- // provided for a configuration resource)
- ARABufferFull, // can't queue the requested operation
- ARADataLockFailed // the ReadLockSecurityData failed
-
- } ARAErr; // result codes returned by ARA
-
-
-
-
- // the following is the type definition for an entry proc in a security
- // code resource
- typedef pascal long
- ( * SecurityEntryProc )( SecurityActions Action,
- SecurityReference MyReference,
- long LongParam );
-
-
-
-
-
- // the following is the type definition for completion procs provided to
- // the ARA services routines.
- typedef pascal void
- ( * SecurityCompletionProc )( SecurityReference MyReference,
- int ResultCode,
- void * DataPtr,
- int DataSize,
- long CompletionParam );
-
-
-
- #endif
-